Skip to content

Add feature: Command Line Interface#101

Open
fkoyer wants to merge 5 commits into
jonkemp:masterfrom
fkoyer:cli
Open

Add feature: Command Line Interface#101
fkoyer wants to merge 5 commits into
jonkemp:masterfrom
fkoyer:cli

Conversation

@fkoyer

@fkoyer fkoyer commented Dec 31, 2020

Copy link
Copy Markdown

This PR adds a command line interface to make it easier to integrate this tool with other scripts and development tools. I needed this functionality to use this tool as a file watcher in PhpStorm. The script sets the url option to a reasonable default. Tested on Windows 10 and CentOS 7.

Usage: inline-css [FILE]

Description:
  Inline css into an html file.

Options:
  -h, --help     Show this message.
  -v, --version  Print version information.

With no FILE, or when FILE is -, read standard input.

@coveralls

coveralls commented Dec 31, 2020

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 95.897% when pulling 2e04624 on fkoyer:cli into 4291cdf on jonkemp:master.

@jonkemp

jonkemp commented Jan 13, 2021

Copy link
Copy Markdown
Owner

Interesting idea. Not sure why you essentially blew away the README file though if you want this PR to be accepted.

@fkoyer

fkoyer commented Jan 13, 2021

Copy link
Copy Markdown
Author

Sorry, that README file wasn't supposed to be part of the PR. I pushed the correct README file. Let me know if you have any questions.

@fkoyer

fkoyer commented Feb 9, 2021

Copy link
Copy Markdown
Author

Just following up to see if this PR can be merged.

@jonkemp

jonkemp commented Feb 13, 2021

Copy link
Copy Markdown
Owner

I plan on reviewing this over the weekend. Thanks for your patience.

@jonkemp

jonkemp commented Feb 15, 2021

Copy link
Copy Markdown
Owner

I'm willing to accept a PR to add a cli to inline-css with the stipulation that it uses meow, https://github.com/sindresorhus/meow.

I would also suggest get-stdin to get stdin, https://github.com/sindresorhus/get-stdin.

If you're interested, there is a boilerplate that might make this easier, https://github.com/sindresorhus/node-cli-boilerplate.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants